import numpy
import pathlib

hp = pathlib.Path.cwd()


def read_file():
    # print(cp)
    # print(hp)
    # str_path = fr"C:\Users\Administrator\Desktop\abc\abc.txt"
    # wp = pathlib.Path(str_path)
    # print(wp)

    np = hp / 'test'
    # print(np)
    # with np.open(mode='w') as f:
    #     f.write("ok")

    # s = np.read_text(encoding="utf-8")
    # print(s)

    f = np.open(encoding="utf-8")

    lines = numpy.array(f.readlines())
    for i, line in enumerate(lines):
        print(i, line)


if __name__ == '__main__':
    read_file()
